using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ERPBackend.Models
{
    public class PurchaseStockInItem : BaseModel
    {
        public int PurchaseStockInId { get; set; }

        [ForeignKey("PurchaseStockInId")]
        public virtual PurchaseStockIn PurchaseStockIn { get; set; }

        public int? PurchaseOrderItemId { get; set; }

        [ForeignKey("PurchaseOrderItemId")]
        public virtual PurchaseOrderItem PurchaseOrderItem { get; set; }

        public int MaterialId { get; set; }

        [ForeignKey("MaterialId")]
        public virtual Material Material { get; set; }

        [Required]
        [MaxLength(255)]
        public string MaterialName { get; set; }

        [MaxLength(255)]
        public string Specification { get; set; }

        [MaxLength(50)]
        public string Unit { get; set; }

        public decimal OrderQuantity { get; set; }

        public decimal StockInQuantity { get; set; }

        public decimal UnitPrice { get; set; }

        public decimal Amount { get; set; }

        [MaxLength(50)]
        public string BatchNo { get; set; }

        public DateTime? ProductionDate { get; set; }

        public DateTime? ExpiryDate { get; set; }

        public string Remark { get; set; }
    }
}